import React, {Component} from 'react';
import {StoreProvider} from 'iflux2';
import AppStore from './store.js';
import Charts from './component/charts'
import Title from './component/title'
import './index.less'
//图标类型：1.粉丝增减趋势 2.互动趋势
const chartsArray = [
    {
        name: 'wxFans',
        title: '微信粉丝增减趋势'
    },{
        name: 'wxInteraction',
        title: '微信互动趋势'
    }
];

@StoreProvider(AppStore)
export default class AppContainer extends Component {
    componentDidMount() {
        this.props.store._getFansInfo()
    }

    render() {
        return (
            <div className="overviewArea">
                <Title />
                {
                    chartsArray.map((item)=>{
                        return <Charts type={item.name} title={item.title}/>
                    })
                }
            </div>
        )
    }
}